package com.itheima.mapper;

import com.itheima.pojo.Category;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author 王同学
 */
@Mapper
@Repository
public interface CategoryMapper {
        //新增菜品分类
        void add(Category category);

        void update(Category category);
       Category getById(String id);

       int delete(String id);

    List<Category> page( @Param("start") Integer start, @Param("pageSize") Integer pageSize);

    List<Category> findAll(Integer type);
}
